<template>
  <div class="home">
    <MdEditor :value="value" :handle-change="onChange" />
    <CodeEditor :value="codeValue" :handle-change="onCodeChange" />
  </div>
</template>

<script lang="ts" setup>
import MdEditor from "@/components/MdEditor.vue";
import { ref } from "vue";
import CodeEditor from "@/components/CodeEditor.vue";

const value = ref("");
const codeValue = ref();
const onChange = (v: string) => {
  value.value = v;
};
const onCodeChange = (v: string) => {
  codeValue.value = v;
  console.log("codeValue:", v);
};
</script>
